package sudoku.support;

import java.io.IOException;

/**
 * @author flutterdash@qq.com
 * @since 2021/10/1 19:23
 */
public class ConsoleHelper {

    public static void clear(int num) throws IOException, InterruptedException {
//        for (int i = 0; i < num; i++)
//            System.out.print("\b");
//        System.out.flush();

        clearConsole();
    }

    public static void clearConsole() throws IOException, InterruptedException {
        new ProcessBuilder("cmd","/c","cls").inheritIO().start().waitFor();
//        System.out.print("\033[H\033[2J");
//        System.out.flush();
    }

    public static void sleep(int num) throws InterruptedException {
        Thread.sleep(num);
    }

}
